package com.liang.pattern;

import com.liang.pattern.factory.JDKProxy;
import com.liang.pattern.factory.impl.EGMCacheAdapter;
import com.liang.pattern.factory.impl.IIRCacheAdapter;
import org.itstack.demo.design.CacheService;
import org.itstack.demo.design.cuisine.impl.CacheServiceImpl;
import org.junit.Test;

/**
 * @author lsm
 * @ClassName testAbstract.java
 * @Description TODO
 * @createTime 2023年11月29日 17:29:00
 */
public class testAbstract {


    @Test
    public void testAb() throws Exception {
        CacheService egmProxy = JDKProxy.getProxy(CacheServiceImpl.class, new EGMCacheAdapter());
        egmProxy.get("123");
        CacheService iirProxy = JDKProxy.getProxy(CacheServiceImpl.class, new IIRCacheAdapter());
        iirProxy.get("345");
    }
}
